var fbplugin={};
fbplugin.userid=0;
fbplugin.acceaccess_tokens=0;
fbplugin.saveUserDataUrl='';
fbplugin.getLogin=function(action){	
	FB.init({
	    appId      : fbplugin.appID,
	    status     : true, // check login status
        cookie     : true, // enable cookies to allow the server to access the session
        xfbml      : true  // parse XFBML
	  });
	//window.location=url;
	FB.getLoginStatus(function(response) {
		if (response.status === 'connected') {	   
			fbplugin.access_token =   response.authResponse.accessToken;
 			fbplugin.userid= response.authResponse.userID;		
 			
		   //do action
		   if(action!=undefined || action!=''){
			   eval(action);			   
		   }		   
		}
	 });
}
